package com.learn.springcloud.streamusedetail.consumer;

import com.learn.springcloud.streamusedetail.sender.MessageSender;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;

/**
 * @Time : 2018/8/22 10:27
 * @Version : 1.0
 */
@EnableBinding(value = {MessageSender.class})
public class MessageConsumer {

    @StreamListener(Sink.INPUT)
    public void receive(Object payload){
        System.out.println("message consumer :" + payload);
    }

}
